# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: SanskritFritz (gmail)
# Contributor: Eugenio M. Vigo <emvigo@gmail.com>
# Contributor: FadeMind <fademind@gmail.com>
# Contributor: Dmitry Korzhevin <dkorzhevin at gmail dot com>
# Contributor: 4javier <4javier4@gmail.com>
# Contributor: G_Syme <demichan(at)mail(dot)upb(dot)de>
# Contributor: cameel <cameel2/gmail/com>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=rednotebook
pkgver=2.29.6
pkgrel=1
pkgdesc='Modern desktop diary and personal journaling tool that lets you format, tag and search your entries'
arch=('any')
url='https://rednotebook.sourceforge.io/'
license=('GPL')
depends=('gtksourceview3' 'python-gobject' 'python-pyenchant' 'python-yaml' 'webkit2gtk')
makedepends=('python-setuptools')
source=("https://github.com/jendrikseipp/rednotebook/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('7710f2e9763010eaf3ec5d8d737a12b1380d66f9c33e4bdb28aa62d8152a89b4')

build() {
  cd $pkgname-$pkgver
  python setup.py build
}

package() {
  cd $pkgname-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build

  for _res in 16 22 32 48 64 128 192 256; do
    install -Dm644 rednotebook/images/rednotebook-icon/rn-$_res.png \
      "$pkgdir/usr/share/icons/hicolor/${_res}x${_res}/apps/$pkgname.png"
  done
}
